package com.gadgets;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.PropertySource;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 功能说明：
 * 著作者：修峻青
 * 创建日期：2023-01-05
 */

@EnableEurekaClient
@SpringBootApplication
@EnableFeignClients(value = "com.gadgets")
@PropertySource(value = {
        "classpath:/config/spring-runningEnv.spring.properties",
        "classpath:/config/spring-application-${gadgets.running.type}.spring.properties"
})
@EnableCaching
@EnableTransactionManagement(proxyTargetClass = true)
public class GadgetsEurekaClientStart {

    public static void main(String[] args) {
        SpringApplication.run(
                new Class[]{
                        GadgetsEurekaClientStart.class,
                        GadgetsFrameworkStart.class
                },args
        );
    }

}
